<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title></title>
<#include "/view/head.html"/>
<script type="text/javascript">
function getTableForm() {
	return document.getElementById('tableForm');
}
function optDelete() {
	if(Pn.checkedCount('ids')<=0) {
		alert("<@s.m 'error.checkRecord'/>");
		return;
	}
	if(!confirm("<@s.m 'global.confirm.delete'/>")) {
		return;
	}
	var f = getTableForm();
	f.action="delete";
	f.submit();
}

</script>
</head>
<body>
<div class="body-box">
<div class="rhead">
	<div class="rpos"><@s.m "global.position"/>: 订单管理 - <@s.m "global.list"/></div>
	<form class="ropt" method="post">
	   	 产品名称<input type="text" name="name" value="${name!}" size="10"/>
	   	 开始时间<input type="text" name="beginTime" value="<#if beginTime??>${beginTime?string('yyyy-MM-dd')}</#if>" size="10" readonly="readonly" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="Wdate"/>
	   	 结束时间<input type="text" name="endTime" value="<#if endTime??>${endTime?string('yyyy-MM-dd')}</#if>" size="10" readonly="readonly" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="Wdate"/>
	    <select name="valid"">
	    	<option value="">全部</option>
	    	<option value="true" <#if valid??><#if valid>selected="selected"</#if></#if>>正常</option>
	    	<option value="false" <#if valid??><#if !valid>selected="selected"</#if></#if>>作废</option>
	    </select>
		<input type="submit" value="搜索" onclick="this.form.action='list';"/>
	</form>
	<div class="clear"></div>
</div>
<form id="tableForm" method="post">
<input type="hidden" name="pageNo" value="${pageNo!}"/>
<@p.table value=pagination;order,i,has_next><#rt/>
	<@p.column title="<input type='checkbox' onclick='Pn.checkbox(\"ids\",this.checked)'/>" width="20">
		<input type='checkbox' name='ids' value='${order.id}'/><#t/>
	</@p.column><#t/>
	<@p.column code="订单号" align="center">${order.id!}</@p.column><#t/>
	<@p.column code="产品名称" align="center">${order.product.name!}</@p.column><#t/>
	<@p.column code="单价" align="right">${order.price?string(",##0.00")}</@p.column><#t/>
	<@p.column code="数量" align="center">${order.quantity!}</@p.column><#t/>
	<@p.column code="金额" align="right">${order.money?string(",##0.00")}</@p.column><#t/>
	<@p.column code="订单时间" align="center">${order.createTime?string("yyyy-MM-dd HH:mm")}</@p.column><#t/>
	<@p.column code="消费者手机号" align="center">${order.consumerMobile!}</@p.column><#t/>
	<@p.column code="状态 " align="center">已付款</@p.column><#t/>
	<@p.column code="global.operate" align="center">
		<br/>
		<a href="edit?id=${order.id}&pageNo=${pageNo!}" class="pn-opt">重发</a> | <#rt/>
		<a href="edit?id=${order.id}&pageNo=${pageNo!}" class="pn-opt">转发</a><br/><br/>
		<a href="${order.id}" class="pn-opt">详情</a> | <#rt/>
		<a href="edit?id=${order.id}&pageNo=${pageNo!}" class="pn-opt">退款</a><br/><br/>
	</@p.column><#t/>
</@p.table>
<div>
	<!-- <input type="button" value="<@s.m "global.delete"/>" onclick="optDelete();"/>&nbsp;   -->
</div>
</form>
</div>
<#include "/common/alert_message.html"/>
</body>
</html>